/**
 * 
 */
package org.hilo.boot.core.db;

import org.aspectj.lang.annotation.Pointcut;

/**
 * 切面表达式 Demmo，参考文档：
 * 
 * Spring：
 * https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#aop-pointcuts
 * 
 * Aspectj官方：
 * http://www.eclipse.org/aspectj/doc/released/progguide/quick.html
 * http://www.eclipse.org/aspectj/doc/released/progguide/language-joinPoints.html
 * http://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html
 * 
 * https://wenku.baidu.com/view/7e91a92d4b73f242336c5ff4.html
 * http://www.360doc.com/content/13/1212/09/14416931_336521220.shtml
 * https://blog.csdn.net/qq525099302/article/details/53996344
 * 
 * @author zollty
 * @since 2018年6月8日
 */
class DefaultPointcuts {
    // 基于 包路径 和 BaseService基类的匹配，并且 排除勿用方法
    public static final String BASE_MAPPER = "within(org.hilo.boot..BaseMapper+)"
            + " && !execution(* toString())"
            + " && !execution(* hashCode())"
            + " && !execution(* getClass())";
    // 基于 包路径 和 BaseService基类的匹配，并且 带有 anno 注解
    public static final String SELECTDB = 
            "within(org.hilo.boot..BaseService+) && @annotation(anno)";
            
//  @Pointcut("execution(* com.xxxx.**.dao.*.*(..))")
//  @Pointcut("within(com.xxxx.**.dao.*) && execution(public * *(..))")
//  @Pointcut("this(org.hilo.boot.core.BaseMapper)")
//  @Pointcut("target(org.hilo.boot.core.BaseMapper)")
    @Pointcut(BASE_MAPPER)
    public void baseMapper() {
    }
    
    @Pointcut(SELECTDB)
    public void selectDB(SelectDB anno) {
    }

}
